#include <iostream>
#include <cstring>
using namespace std;

int M;
int A, B, C;
int PEOPLE[12];
int DP[12][10010];

const int MAX_INT = 0x6F6F6F6F;

int main() {
	while (true) {
		cin >> M;
		if (M==0) break;
		cin >> A >> B >> C;
		for (int i=0; i<M; i++) {
			cin >> PEOPLE[i];
		}
		//Initialize DP
		int max_p=PEOPLE[0];
		for (int i=1; i<M; i++) {
			if (PEOPLE[i]>max_p) max_p = PEOPLE[i];
		}
		memset(DP, 0x6F, sizeof(DP));
		for (int i=PEOPLE[0]; i<=max_p; i++) {
			DP[0][i] = B*i + A*i;
		}
		//DP Process
		for (int i=1; i<M; i++) {
			for (int k=PEOPLE[i]; k<=max_p; k++) {
				for (int j=PEOPLE[i-1]; j<=max_p; j++) {
					int cost;
					if (k>j) {
						cost = k*B + (k-j)*A;
					} else if (k<j) {
						cost = k*B + (j-k)*C;
					} else {
						cost = k*B;
					}
					cost += DP[i-1][j];
					if (cost < DP[i][k]) {
						DP[i][k] = cost;
					}
				}
			}
		}
		//Result
		int result = MAX_INT;
		for (int j=PEOPLE[M-1]; j<=max_p; j++) {
			if (DP[M-1][j] < result) {
				result = DP[M-1][j];
			}
		}
		cout << result << endl;
	}
	return 0;
}
